1100 |
Is it is possible to exclude the non-working days when displaying the histogram using the exBarEffort for exHistOverAllocation type
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->LevelCount = 2; var_Chart->set_PaneWidth(false,40); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2005,6,20).operator double())); var_Chart->HistogramVisible = true; var_Chart->HistogramHeight = 64; var_Chart->HistogramView = Exg2anttlib_tlb::HistogramViewEnum::exHistogramAllItems; Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Split")); var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternBDiagonal; var_Bar->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeThinUp; var_Bar->Color = RGB(0,0,128); Exg2anttlib_tlb::IBarPtr var_Bar1 = var_Chart->Bars->Add(L"Task:Split"); var_Bar1->Color = RGB(0,0,128); var_Bar1->Shortcut = L"WorkingTask"; var_Bar1->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternBDiagonal; var_Bar1->HistogramPattern = Exg2anttlib_tlb::PatternEnum::exPatternBDiagonal; var_Bar1->HistogramType = Exg2anttlib_tlb::HistogramTypeEnum::exHistOverAllocation; Exg2anttlib_tlb::IBarPtr var_Bar2 = var_Chart->Bars->get_Item(TVariant("Task")); var_Bar2->Color = RGB(0,0,255); var_Bar2->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternFDiagonal; var_Bar2->HistogramType = Exg2anttlib_tlb::HistogramTypeEnum::exHistOverAllocation; var_Bar2->HistogramPattern = Exg2anttlib_tlb::PatternEnum::exPatternFDiagonal; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("True")); var_Items->AddBar(h,TVariant("WorkingTask"),TVariant(TDateTime(2005,6,23).operator double()),TVariant(TDateTime(2005,6,29).operator double()),TNoParam(),TNoParam()); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarEffort,TVariant(4)); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); h = var_Items->AddItem(TVariant("False")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2005,6,23).operator double()),TVariant(TDateTime(2005,6,29).operator double()),TNoParam(),TNoParam()); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarEffort,TVariant(4)); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(false)); G2antt1->EndUpdate(); |
1099 |
I display numbers in my chart, but the AddBar requires a date how can I add a bar
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->NonworkingDays = 0; var_Chart->set_FirstVisibleDate(TVariant(0)); var_Chart->ToolTip = L""; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%i%>")); var_Level->set_ToolTip(TVariant("")); var_Chart->UnitWidth = 24; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(2),TVariant(4),TNoParam(),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(6),TVariant(10),TNoParam(),TNoParam()); G2antt1->EndUpdate(); |
1098 |
I display numbers in the chart's header but do not want to get displayed negative numbers. How can i do that
// DateChange event - Occurs when the first visible date is changed. void __fastcall TForm1::G2antt1DateChange(TObject *Sender) { G2antt1->Chart->set_FirstVisibleDate(TVariant(0)); G2antt1->ScrollPartEnable[Exg2anttlib_tlb::ScrollBarEnum::exHChartScroll,Exg2anttlib_tlb::ScrollPartEnum::exLeftBPart] = false; } G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->NonworkingDays = 0; var_Chart->set_FirstVisibleDate(TVariant(0)); var_Chart->ToolTip = L""; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%i%>")); var_Level->set_ToolTip(TVariant("<%i%>")); var_Chart->UnitWidth = 24; G2antt1->EndUpdate(); |
1097 |
How can I display numbers in the chart's header instead dates
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->NonworkingDays = 0; var_Chart->set_FirstVisibleDate(TVariant(0)); var_Chart->ToolTip = L""; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%i%>")); var_Level->set_ToolTip(TVariant("")); var_Chart->UnitWidth = 24; G2antt1->EndUpdate(); |
1096 |
How can I create a bar that's not sizable, or can not be resized by default similar with milestone
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,24).operator double())); var_Chart->LevelCount = 2; Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->Add(L"Custom"); var_Bar->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeEmpty; var_Bar->StartShape = Exg2anttlib_tlb::ShapeCornerEnum::exShapeIconUp1; var_Bar->EndShape = Exg2anttlib_tlb::ShapeCornerEnum::exShapeIconEmpty; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("")),TVariant("Custom"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,2).operator double()),TVariant("K1"),TVariant("This TYPE of bar can not be resized.")); G2antt1->EndUpdate(); |
1095 |
Is it possible to hide the non-working parts for items using the ItemNonworkingUnits, even if set the ShowNonworkingUnits, ShowNonworkingDates on False
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,27).operator double())); var_Chart->set_PaneWidth(false,64); var_Chart->LevelCount = 2; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingDates = false; var_Chart->NonworkingDaysPattern = Exg2anttlib_tlb::PatternEnum::exPatternEmpty; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->set_ItemNonworkingUnits(h2,TVariant(false),L"weekday(value) = 1"); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); G2antt1->EndUpdate(); |
1094 |
Is it possible to show the non-working parts for certain items, even if I hide the default non-working part
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,27).operator double())); var_Chart->set_PaneWidth(false,64); var_Chart->LevelCount = 2; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingDates = false; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->set_ItemNonworkingUnits(h2,TVariant(false),L"weekday(value) = 1"); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); G2antt1->EndUpdate(); |
1093 |
How can I hide the non-working part of the chart
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2008,1,1).operator double())); var_Chart->set_PaneWidth(false,0); var_Chart->LevelCount = 2; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingDates = false; G2antt1->EndUpdate(); |
1092 |
Is it possible to let users selects cells as in Excel
G2antt1->BeginUpdate(); G2antt1->FullRowSelect = Exg2anttlib_tlb::CellSelectEnum::exRectSel; G2antt1->SingleSel = false; G2antt1->ReadOnly = Exg2anttlib_tlb::ReadOnlyEnum::exReadOnly; G2antt1->MarkSearchColumn = false; G2antt1->ShowFocusRect = false; G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot; G2antt1->SelForeColor = RGB(0,0,0); G2antt1->SelBackColor = RGB(200,225,242); Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"A"); Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"B"); var_Column->AllowSizing = false; var_Column->Width = 24; Exg2anttlib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"C"); var_Column1->AllowSizing = false; var_Column1->Width = 24; var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(1)); var_Column1->PartialCheck = true; Exg2anttlib_tlb::IColumnPtr var_Column2 = var_Columns->Add(L"D"); var_Column2->AllowSizing = false; var_Column2->Width = 24; var_Column2->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellHasRadioButton,TVariant(1)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->InsertItem(TNoParam(),TNoParam(),TVariant("Group 1")); long h1 = var_Items->InsertItem(h,TNoParam(),TVariant(16)); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(17)); h1 = var_Items->InsertItem(h,TNoParam(),TVariant(2)); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(11)); h1 = var_Items->InsertItem(h,TNoParam(),TVariant(2)); var_Items->set_ItemBackColor(h1,RGB(240,240,240)); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(9)); var_Items->set_ExpandItem(h,true); h = var_Items->InsertItem(TNoParam(),TNoParam(),TVariant("Group 2")); var_Items->set_CellValueFormat(TVariant(h),TVariant(2),Exg2anttlib_tlb::ValueFormatEnum::exHTML); h1 = var_Items->InsertItem(h,TNoParam(),TVariant(16)); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(9)); h1 = var_Items->InsertItem(h,TNoParam(),TVariant(12)); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(11)); h1 = var_Items->InsertItem(h,TNoParam(),TVariant(2)); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(2)); var_Items->set_ExpandItem(h,true); var_Items->set_SelectItem(h,true); G2antt1->EndUpdate(); |
1091 |
How can I hide a date from the chart view
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2008,1,1).operator double())); var_Chart->set_PaneWidth(false,0); var_Chart->LevelCount = 2; var_Chart->AllowInsideZoom = true; var_Chart->AllowResizeInsideZoom = false; var_Chart->InsideZoomOnDblClick = false; Exg2anttlib_tlb::IInsideZoomsPtr var_InsideZooms = var_Chart->InsideZooms; var_InsideZooms->SplitBaseLevel = false; var_InsideZooms->DefaultWidth = 0; var_InsideZooms->Add(TVariant(TDateTime(2008,1,4).operator double())); var_InsideZooms->Add(TVariant(TDateTime(2008,1,5).operator double())); var_InsideZooms->Add(TVariant(TDateTime(2008,1,6).operator double())); var_Chart->SelectLevel = 1; var_Chart->set_SelectDate(TDateTime(2008,1,5).operator double(),true); G2antt1->EndUpdate(); |
1090 |
Can the SchedulePDM displays and edit the working units for my bars
// BarResizing event - Occurs when a bar is moving or resizing. void __fastcall TForm1::G2antt1BarResizing(TObject *Sender,Exg2anttlib_tlb::HITEM Item,Variant Key) { G2antt1->Items->SchedulePDM(Item,TVariant(Key)); } G2antt1->BeginUpdate(); G2antt1->Items->AllowCellValueToItemBar = true; G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IColumnPtr var_Column = G2antt1->Columns->Add(L"Working"); var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(258)); var_Column->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::SpinType; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,28).operator double())); var_Chart->set_PaneWidth(false,96); var_Chart->AllowLinkBars = false; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exNoCreateBar; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant(""),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant(""),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant("")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant(""),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant(""),h3,TVariant("")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FF")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(2)); long h4 = var_Items->AddItem(TVariant("Task 4")); var_Items->AddBar(h4,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant(""),TNoParam()); var_Items->AddLink(TVariant("L3"),h4,TVariant(""),h3,TVariant("")); var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); var_Items->SchedulePDM(var_Items->FirstVisibleItem,TVariant("")); G2antt1->EndUpdate(); |
1089 |
Can the SchedulePDM displays the working units for my bars
// BarResizing event - Occurs when a bar is moving or resizing. void __fastcall TForm1::G2antt1BarResizing(TObject *Sender,Exg2anttlib_tlb::HITEM Item,Variant Key) { G2antt1->Items->SchedulePDM(Item,TVariant(Key)); } G2antt1->BeginUpdate(); G2antt1->Items->AllowCellValueToItemBar = true; G2antt1->Columns->Add(L"Task"); G2antt1->Columns->Add(L"Working")->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(258)); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,28).operator double())); var_Chart->set_PaneWidth(false,96); var_Chart->AllowLinkBars = false; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exNoCreateBar; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant(""),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant(""),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant("")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant(""),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant(""),h3,TVariant("")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FF")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(2)); long h4 = var_Items->AddItem(TVariant("Task 4")); var_Items->AddBar(h4,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant(""),TNoParam()); var_Items->AddLink(TVariant("L3"),h4,TVariant(""),h3,TVariant("")); var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); var_Items->SchedulePDM(var_Items->FirstVisibleItem,TVariant("")); G2antt1->EndUpdate(); |
1088 |
Can the SchedulePDM keeps the working units for my bars
// BarResizing event - Occurs when a bar is moving or resizing. void __fastcall TForm1::G2antt1BarResizing(TObject *Sender,Exg2anttlib_tlb::HITEM Item,Variant Key) { G2antt1->Items->SchedulePDM(Item,TVariant(Key)); } G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,28).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->AllowLinkBars = false; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exNoCreateBar; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FF")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(2)); long h4 = var_Items->AddItem(TVariant("Task 4")); var_Items->AddBar(h4,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K4"),TNoParam()); var_Items->AddLink(TVariant("L3"),h4,TVariant("K4"),h3,TVariant("K3")); var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1087 |
How can I arrange automatically the bars based on their links as soon as user moves the bars
// BarResizing event - Occurs when a bar is moving or resizing. void __fastcall TForm1::G2antt1BarResizing(TObject *Sender,Exg2anttlib_tlb::HITEM Item,Variant Key) { G2antt1->Items->SchedulePDM(Item,TVariant(Key)); } G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,28).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->AllowLinkBars = false; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exNoCreateBar; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FF")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(2)); long h4 = var_Items->AddItem(TVariant("Task 4")); var_Items->AddBar(h4,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K4"),TNoParam()); var_Items->AddLink(TVariant("L3"),h4,TVariant("K4"),h3,TVariant("K3")); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1086 |
How can I arrange automatically the bars based on their links as soon as user moves the bars
// BarResize event - Occurs when a bar is moved or resized. void __fastcall TForm1::G2antt1BarResize(TObject *Sender,Exg2anttlib_tlb::HITEM Item,Variant Key) { G2antt1->Items->SchedulePDM(Item,TVariant(Key)); } G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->AllowLinkBars = false; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exNoCreateBar; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1085 |
I have some buttons added on the control's scroll bar, how can I can know when the button is being clicked
// ScrollButtonClick event - Occurs when the user clicks a button in the scrollbar. void __fastcall TForm1::G2antt1ScrollButtonClick(TObject *Sender,Exg2anttlib_tlb::ScrollBarEnum ScrollBar,Exg2anttlib_tlb::ScrollPartEnum ScrollPart) { OutputDebugString( L"ScrollBar" ); OutputDebugString( L"ScrollPart" ); } G2antt1->ScrollPartVisible[Exg2anttlib_tlb::ScrollBarEnum::exHScroll,Exg2anttlib_tlb::ScrollPartEnum::exLeftB1Part] = true; G2antt1->ScrollPartVisible[Exg2anttlib_tlb::ScrollBarEnum::exHScroll,Exg2anttlib_tlb::ScrollPartEnum::exLeftB2Part] = true; G2antt1->ScrollPartVisible[Exg2anttlib_tlb::ScrollBarEnum::exHScroll,Exg2anttlib_tlb::ScrollPartEnum::exRightB6Part] = true; G2antt1->ScrollPartVisible[Exg2anttlib_tlb::ScrollBarEnum::exHScroll,Exg2anttlib_tlb::ScrollPartEnum::exRightB5Part] = true; G2antt1->ScrollBars = Exg2anttlib_tlb::ScrollBarsEnum::exDisableNoHorizontal; |
1084 |
How do I get notified once the user clicks a hyperlink created using the anchor HTML tag
// AnchorClick event - Occurs when an anchor element is clicked. void __fastcall TForm1::G2antt1AnchorClick(TObject *Sender,BSTR AnchorID,BSTR Options) { OutputDebugString( L"AnchorID" ); OutputDebugString( L"Options" ); } G2antt1->Columns->Add(L"Default")->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddItem(TVariant("This is a link: <aex.com;1>www.exontrol.com</a>")); var_Items->AddItem(TVariant("This is a link: <aex.net;2>www.exontrol.net</a>")); |
1083 |
Is it possible to start editing a cell when double click it
// DblClick event - Occurs when the user dblclk the left mouse button over an object. void __fastcall TForm1::G2antt1DblClick(TObject *Sender,short Shift,int X,int Y) { G2antt1->Edit(TNoParam()); } G2antt1->BeginUpdate(); G2antt1->AutoEdit = false; G2antt1->MarkSearchColumn = false; G2antt1->Columns->Add(L"Edit1")->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::EditType; G2antt1->Columns->Add(L"Edit2")->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::EditType; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(1))),TVariant(1),TVariant(2)); Exg2anttlib_tlb::IItemsPtr var_Items1 = G2antt1->Items; var_Items1->set_CellValue(TVariant(var_Items1->AddItem(TVariant(3))),TVariant(1),TVariant(4)); G2antt1->EndUpdate(); |
1082 |
Is it possible to disable standard single-click behavior for this column, so I manually could call Edit() when needed
// DblClick event - Occurs when the user dblclk the left mouse button over an object. void __fastcall TForm1::G2antt1DblClick(TObject *Sender,short Shift,int X,int Y) { G2antt1->Edit(TNoParam()); } G2antt1->BeginUpdate(); G2antt1->AutoEdit = false; G2antt1->MarkSearchColumn = false; G2antt1->Columns->Add(L"Edit1")->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::EditType; G2antt1->Columns->Add(L"Edit2")->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::EditType; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(1))),TVariant(1),TVariant(2)); Exg2anttlib_tlb::IItemsPtr var_Items1 = G2antt1->Items; var_Items1->set_CellValue(TVariant(var_Items1->AddItem(TVariant(3))),TVariant(1),TVariant(4)); G2antt1->EndUpdate(); |
1081 |
How can I get or restore the old or previously value for the cell being changed
// Change event - Occurs when the user changes the cell's content. void __fastcall TForm1::G2antt1Change(TObject *Sender,Exg2anttlib_tlb::HITEM Item,long ColIndex,Variant * NewValue) { OutputDebugString( L"Old-Value:" ); OutputDebugString( PChar(G2antt1->Items->get_CellValue(TVariant(Item),TVariant(ColIndex))) ); OutputDebugString( L"New-Value:" ); OutputDebugString( L"NewValue" ); } G2antt1->BeginUpdate(); G2antt1->MarkSearchColumn = false; G2antt1->Columns->Add(L"Edit1")->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::EditType; G2antt1->Columns->Add(L"Edit2")->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::EditType; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(1))),TVariant(1),TVariant(2)); Exg2anttlib_tlb::IItemsPtr var_Items1 = G2antt1->Items; var_Items1->set_CellValue(TVariant(var_Items1->AddItem(TVariant(3))),TVariant(1),TVariant(4)); G2antt1->EndUpdate(); |
1080 |
How can I display the number of items being found after filtering
// FilterChange event - Occurs when the filter was changed. void __fastcall TForm1::G2antt1FilterChange(TObject *Sender) { G2antt1->FilterBarCaption = PChar(G2antt1->Items->VisibleCount); } G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptContainsAll; G2antt1->FilterBarPromptPattern = L"london"; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1079 |
How can I highligth the item from the cursor as it moves
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::G2antt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { G2antt1->BeginUpdate(); long h = G2antt1->ItemFromPoint[-1,-1,c,hit]; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->ClearItemBackColor(G2antt1->get_Background(Exg2anttlib_tlb::BackgroundPartEnum(0x200 | Exg2anttlib_tlb::BackgroundPartEnum::exHSRight | Exg2anttlib_tlb::BackgroundPartEnum::exListOLEDropPosition))); var_Items->set_ItemBackColor(h,RGB(240,250,240)); G2antt1->Background[Exg2anttlib_tlb::BackgroundPartEnum(0x200 | Exg2anttlib_tlb::BackgroundPartEnum::exHSRight | Exg2anttlib_tlb::BackgroundPartEnum::exListOLEDropPosition)] = h; G2antt1->EndUpdate(); } G2antt1->BeginUpdate(); G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot; G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; G2antt1->SelBackColor = RGB(240,250,240); G2antt1->SelForeColor = RGB(0,0,0); G2antt1->ShowFocusRect = false; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->SelBackColor = RGB(240,250,240); G2antt1->Columns->Add(L"Items"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("R2")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.2")); var_Items->set_ExpandItem(h,true); G2antt1->EndUpdate(); |
1078 |
How can I get the item from the cursor
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::G2antt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { long h = G2antt1->ItemFromPoint[-1,-1,c,hit]; OutputDebugString( L"Handle" ); OutputDebugString( L"h" ); OutputDebugString( L"Index" ); OutputDebugString( PChar(G2antt1->Items->get_ItemToIndex(h)) ); } G2antt1->BeginUpdate(); G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot; G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; G2antt1->Columns->Add(L"Items"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("R2")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.2")); var_Items->set_ExpandItem(h,true); G2antt1->EndUpdate(); |
1077 |
How can I get the column from the cursor, not only in the header
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::G2antt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { OutputDebugString( PChar(G2antt1->ColumnFromPoint[-1,0]) ); } G2antt1->BeginUpdate(); G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot; G2antt1->Columns->Add(L"P1"); G2antt1->Columns->Add(L"P2"); G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant("R2")); var_Items->set_CellValue(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.1"))),TVariant(1),TVariant("Cell 1.2")); var_Items->set_CellValue(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.1"))),TVariant(1),TVariant("Cell 2.2")); var_Items->set_ExpandItem(h,true); G2antt1->EndUpdate(); |
1076 |
How can I get the column from the cursor
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::G2antt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { OutputDebugString( PChar(G2antt1->ColumnFromPoint[-1,-1]) ); } G2antt1->BeginUpdate(); G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot; G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; G2antt1->Columns->Add(L"P1"); G2antt1->Columns->Add(L"P2"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant("R2")); var_Items->set_CellValue(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.1"))),TVariant(1),TVariant("Cell 1.2")); var_Items->set_CellValue(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.1"))),TVariant(1),TVariant("Cell 2.2")); var_Items->set_ExpandItem(h,true); G2antt1->EndUpdate(); |
1075 |
How can I get the cell's caption from the cursor
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::G2antt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { long h = G2antt1->ItemFromPoint[-1,-1,c,hit]; OutputDebugString( G2antt1->Items->get_CellCaption(TVariant(h),TVariant(c)) ); } G2antt1->BeginUpdate(); G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot; G2antt1->Columns->Add(L"Items"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("R1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 1.2")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("R2")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.1")); var_Items->InsertItem(h,TNoParam(),TVariant("Cell 2.2")); var_Items->set_ExpandItem(h,true); G2antt1->EndUpdate(); |
1074 |
Is it possible to change the style for the vertical or horizontal grid lines, in the list area
G2antt1->BeginUpdate(); G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; G2antt1->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesVSolid | Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesHDot4; G2antt1->Columns->Add(L"C1"); G2antt1->Columns->Add(L"C2"); G2antt1->Columns->Add(L"C3"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Item 1")); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant("SubItem 1.2")); var_Items->set_CellValue(TVariant(h),TVariant(2),TVariant("SubItem 1.3")); h = var_Items->AddItem(TVariant("Item 2")); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant("SubItem 2.2")); var_Items->set_CellValue(TVariant(h),TVariant(2),TVariant("SubItem 2.3")); G2antt1->EndUpdate(); |
1073 |
How can I show the bars over the grid lines, i.e. so you cannot see the grid lines 'through' the bar
G2antt1->BeginUpdate(); G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; G2antt1->GridLineColor = RGB(220,220,220); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesBehind; var_Chart->LevelCount = 2; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(1); var_Level->DrawGridLines = true; var_Level->GridLineColor = RGB(220,220,220); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task")); var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternSolid; var_Bar->Height = 14; G2antt1->Columns->Add(L"Column"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Item 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("A"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("B"),TNoParam()); G2antt1->EndUpdate(); |
1072 |
Is it possible to change the style for the vertical grid lines, in the chart area only
G2antt1->BeginUpdate(); G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; G2antt1->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesDash; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesDash; var_Chart->LevelCount = 2; var_Chart->get_Level(1)->DrawGridLines = true; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->GridLineColor = RGB(255,0,0); var_Level->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesVSolid; var_Chart->Bars->get_Item(TVariant("Task"))->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternSolid; G2antt1->Columns->Add(L"Column"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Item 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("A"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("B"),TNoParam()); G2antt1->EndUpdate(); |
1071 |
Is it possible to change the style for the grid lines, for instance to be solid not dotted
G2antt1->BeginUpdate(); G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; G2antt1->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesSolid; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesSolid; var_Chart->LevelCount = 2; var_Chart->get_Level(1)->DrawGridLines = true; var_Chart->Bars->get_Item(TVariant("Task"))->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternSolid; G2antt1->Columns->Add(L"Column"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Item 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("A"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("B"),TNoParam()); G2antt1->EndUpdate(); |
1070 |
How can I show the grid lines for the chart and list area
G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->LevelCount = 2; var_Chart->get_Level(1)->DrawGridLines = true; var_Chart->Bars->get_Item(TVariant("Task"))->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternSolid; G2antt1->Columns->Add(L"Column"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Item 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("A"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,15).operator double()),TVariant("B"),TNoParam()); |
1069 |
In the level of the chart we are showing the week number of the year (1-53) (Week: ww). However the weeknumber isn't correct. In western Europe the week of 04/01/2010 till 10/01/2010 is weeknumber 1, however the g2antt says it's week 2
|
1068 |
How can I determine the current visible date range of the gantt chart area
G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TNoParam(),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TNoParam(),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,6).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TNoParam(),TNoParam()); OutputDebugString( PChar(G2antt1->Chart->get_StartPrintDate()) ); OutputDebugString( PChar(G2antt1->Chart->get_EndPrintDate()) ); |
1067 |
How can I change the progress bar using a spin editor using values from 0 to 100
G2antt1->BeginUpdate(); G2antt1->Items->AllowCellValueToItemBar = true; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Task"); Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Percent"); var_Column->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::SpinType; var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(518)); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->Bars->Add(L"Task%Progress"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task%Progress"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam()); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(40)); h = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h,TVariant("Task%Progress"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TNoParam(),TNoParam()); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(50)); G2antt1->EndUpdate(); |
1066 |
Is it possible to display the histogram for selected bars only
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->LevelCount = 2; var_Chart->set_PaneWidth(false,64); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->HistogramVisible = true; var_Chart->HistogramView = Exg2anttlib_tlb::HistogramViewEnum::exHistogramSelectedBars; var_Chart->HistogramHeight = 32; var_Chart->Bars->get_Item(TVariant("Task"))->HistogramPattern = Exg2anttlib_tlb::PatternEnum::exPatternBDiagonal; G2antt1->Columns->Add(L"Column"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Item 1")),TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant(1),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Item 2")),TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant(2),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Item 3")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant(3),TNoParam()); var_Items->set_ItemBar(0,TVariant(2),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarSelected,TVariant(true)); var_Items->set_ItemBar(0,TVariant(3),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarSelected,TVariant(true)); G2antt1->EndUpdate(); |
1065 |
How can I fix a bar, so it is not selectable, moveable or resizable, fixed in other words
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("K1"),TVariant("Unselectable")); var_Items->set_ItemBar(h1,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarSelectable,TVariant(false)); G2antt1->EndUpdate(); |
1064 |
How can I fix a bar, so it is not moveable or resizable
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TVariant("Fixed")); var_Items->set_ItemBar(h1,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanResize,TVariant(false)); var_Items->set_ItemBar(h1,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanMove,TVariant(false)); G2antt1->EndUpdate(); |
1063 |
Is is possible to fix a bar during PDM scheduling
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("TaskF"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->set_ItemBar(h1,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanResize,TVariant(false)); var_Items->set_ItemBar(h1,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanMove,TVariant(false)); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("TaskF"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K3"),TNoParam()); var_Items->set_ItemBar(h3,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanResize,TVariant(false)); var_Items->set_ItemBar(h3,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanMove,TVariant(false)); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1062 |
How can I specify that during scheduling the link, bars should be delayed, on working part
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,3).operator double()),TVariant("K1"),TNoParam()); var_Items->set_ItemBar(h1,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K2"),TNoParam()); var_Items->set_ItemBar(h2,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FS")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K3"),TNoParam()); var_Items->set_ItemBar(h3,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("link delays the bars<br>for <b>2</b> working days")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkPDMWorkingDelay,TVariant(2)); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1061 |
How can I specify that during scheduling the link, bars should be delayed
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->ShowNonworkingDates = false; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FS")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant(" Finish-Start<br>delayed <b>4</b> days")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkPDMDelay,TVariant(4)); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1060 |
The SchedulePDM method put the bars on non-working part, how can I prevent that
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->set_ItemBar(h1,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K2"),TNoParam()); var_Items->set_ItemBar(h2,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FS")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K3"),TNoParam()); var_Items->set_ItemBar(h3,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FS")); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1059 |
How can I add a SF (Start-Finish) link so activities get arranged using the SchedulePDM
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,28).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FS")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("SF")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(0)); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(2)); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1058 |
How can I add a SS (Start-Start) link so activities get arranged using the SchedulePDM
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,28).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FS")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("SS")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(0)); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(0)); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1057 |
How can I add a FF (Finish-Finish) link so activities get arranged using the SchedulePDM
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,28).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FS")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FF")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(2)); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1056 |
How can I add a FS (Finish-Start) link so activities get arranged using the SchedulePDM
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FS")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->set_Link(TVariant("L2"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("FS")); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1055 |
How can I schedule activities in the project plan
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h3,TVariant("K3"),h2,TVariant("K2")); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1054 |
How do I arrange the bars based on the links
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); long h3 = var_Items->AddItem(TVariant("Task 3")); var_Items->AddBar(h3,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K3"),TNoParam()); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->SchedulePDM(0,TVariant("K1")); G2antt1->EndUpdate(); |
1053 |
Is is possible to use HTML tags to display in the filter caption
G2antt1->BeginUpdate(); G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarCaption = L"This is a bit of text being displayed in the filter bar."; G2antt1->Columns->Add(L""); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddItem(TVariant("Item 1")); var_Items->AddItem(TVariant("Item 2")); var_Items->AddItem(TVariant("Item 3")); G2antt1->EndUpdate(); |
1052 |
How can I find the number of items after filtering
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L""); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("")); var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant(var_Items->VisibleItemCount)); G2antt1->EndUpdate(); |
1051 |
How can I change the filter caption
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptWords | Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptContainsAll; G2antt1->FilterBarPromptPattern = L"london robert"; G2antt1->FilterBarCaption = L"<r>Found: ... "; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1050 |
While using the filter prompt is it is possible to use wild characters
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptPattern; G2antt1->FilterBarPromptPattern = L"lon* seat*"; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1049 |
How can I list all items that contains any of specified words, not necessary at the beggining
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptStartWords | Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptContainsAny; G2antt1->FilterBarPromptPattern = L"london davolio"; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1048 |
How can I list all items that contains any of specified words, not strings
G2antt1->BeginUpdate(); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->Chart->set_PaneWidth(true,0); G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptWords | Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptContainsAny; G2antt1->FilterBarPromptPattern = L"london nancy"; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1047 |
How can I list all items that contains all specified words, not strings
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptWords | Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptContainsAll; G2antt1->FilterBarPromptPattern = L"london robert"; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1046 |
I've noticed that the filtering by prompt is not case sensitive, is is possible to make it case sensitive
G2antt1->BeginUpdate(); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptCaseSensitive | Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptContainsAny; G2antt1->FilterBarPromptPattern = L"Anne"; G2antt1->Chart->set_PaneWidth(true,0); Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1045 |
Is it possible to list only items that ends with any of specified strings
G2antt1->BeginUpdate(); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptEndWith; G2antt1->set_FilterBarPromptColumns(TVariant("0")); G2antt1->FilterBarPromptPattern = L"Fuller"; G2antt1->Chart->set_PaneWidth(true,0); Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1044 |
Is it possible to list only items that ends with any of specified strings
G2antt1->BeginUpdate(); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptEndWith; G2antt1->set_FilterBarPromptColumns(TVariant("0")); G2antt1->FilterBarPromptPattern = L"Fuller"; G2antt1->Chart->set_PaneWidth(true,0); Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1043 |
Is it possible to list only items that starts with any of specified strings
G2antt1->BeginUpdate(); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptStartWith; G2antt1->set_FilterBarPromptColumns(TVariant("0")); G2antt1->FilterBarPromptPattern = L"An M"; G2antt1->Chart->set_PaneWidth(true,0); Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1042 |
Is it possible to list only items that starts with specified string
G2antt1->BeginUpdate(); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptStartWith; G2antt1->set_FilterBarPromptColumns(TVariant("0")); G2antt1->FilterBarPromptPattern = L"A"; G2antt1->Chart->set_PaneWidth(true,0); Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1041 |
How can I specify that the list should include any of the seqeunces in the pattern
G2antt1->BeginUpdate(); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptContainsAny; G2antt1->FilterBarPromptPattern = L"london seattle"; G2antt1->Chart->set_PaneWidth(true,0); Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1040 |
How can I specify that all sequences in the filter pattern must be included in the list
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptType = Exg2anttlib_tlb::FilterPromptEnum::exFilterPromptContainsAll; G2antt1->FilterBarPromptPattern = L"london manager"; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1039 |
How do I change at runtime the filter prompt
G2antt1->BeginUpdate(); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->Chart->set_PaneWidth(true,0); G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPromptPattern = L"london manager"; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1038 |
How do I specify to filter only a single column when using the filter prompt
G2antt1->BeginUpdate(); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->Chart->set_PaneWidth(true,0); G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->set_FilterBarPromptColumns(TVariant("2,3")); G2antt1->FilterBarPromptPattern = L"london"; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1037 |
How do I change the prompt or the caption being displayed in the filter bar
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; G2antt1->FilterBarPrompt = L"changed"; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); G2antt1->EndUpdate(); |
1036 |
How do I enable the filter prompt feature
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->ColumnAutoResize = true; G2antt1->ContinueColumnScroll = false; G2antt1->FocusColumnIndex = 1; G2antt1->MarkSearchColumn = false; G2antt1->SearchColumnIndex = 1; G2antt1->FilterBarPromptVisible = true; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name")->Width = 96; var_Columns->Add(L"Title")->Width = 96; var_Columns->Add(L"City"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("Nancy Davolio")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Andrew Fuller")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Vice President, Sales")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Tacoma")); var_Items->set_SelectItem(h0,true); h0 = var_Items->AddItem(TVariant("Janet Leverling")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Kirkland")); h0 = var_Items->AddItem(TVariant("Margaret Peacock")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Redmond")); h0 = var_Items->AddItem(TVariant("Steven Buchanan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Manager")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Michael Suyama")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Robert King")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); h0 = var_Items->AddItem(TVariant("Laura Callahan")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Inside Sales Coordinator")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("Seattle")); h0 = var_Items->AddItem(TVariant("Anne Dodsworth")); var_Items->set_CellValue(TVariant(h0),TVariant(1),TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h0),TVariant(2),TVariant("London")); G2antt1->EndUpdate(); |
1035 |
How can I unselect all bars
G2antt1->Columns->Add(L"Task"); G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K2"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 3")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K3"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K4"),TNoParam()); var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarSelected,TVariant(true)); var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarSelected,TVariant(false)); |
1034 |
Can I select bars using a pattern using wild characters as *,
G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->ShowNonworkingDates = false; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1K"),TVariant("K1K")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2M"),TVariant("K2M")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,9).operator double()),TVariant(TDateTime(2001,1,11).operator double()),TVariant("K3K"),TVariant("K3K")); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("Q"),TVariant("Q")); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("M"),TVariant("M")); var_Items->set_ItemBar(0,TVariant("<K*K>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarSelected,TVariant(true)); |
1033 |
How can I select all bars in the item with a specified key
G2antt1->Columns->Add(L"Task"); G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); G2antt1->Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TVariant("K1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2"),TVariant("K2")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,9).operator double()),TVariant(TDateTime(2001,1,11).operator double()),TVariant("P"),TVariant("P")); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("Q"),TVariant("Q")); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("M"),TVariant("M")); var_Items->set_ItemBar(h,TVariant("<K*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarSelected,TVariant(true)); |
1032 |
How can I select all bars in the specified item
G2antt1->Columns->Add(L"Task"); G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); G2antt1->Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TVariant("K1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2"),TVariant("K2")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,9).operator double()),TVariant(TDateTime(2001,1,11).operator double()),TVariant("P"),TVariant("P")); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("Q"),TVariant("Q")); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("M"),TVariant("M")); var_Items->set_ItemBar(h,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarSelected,TVariant(true)); |
1031 |
How can I select all bars with a specified key
G2antt1->Columns->Add(L"Task"); G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); G2antt1->Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TVariant("K1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2"),TVariant("K2")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("P"),TVariant("P")); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("Q"),TVariant("Q")); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("P"),TVariant("P")); var_Items->set_ItemBar(0,TVariant("<P>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarSelected,TVariant(true)); |
1030 |
How can I select all bars
G2antt1->Columns->Add(L"Task"); G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); G2antt1->Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TVariant("K1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2"),TVariant("K2")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("P"),TVariant("P")); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("Q"),TVariant("Q")); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("M"),TVariant("M")); var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarSelected,TVariant(true)); |
1029 |
I have the AllowInsideZoom property on True, but I am still not able to use the inside zoom feature
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,0); var_Chart->LevelCount = 3; var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->get_Level(0)->set_Label(TVariant("Week: <%ww%>")); Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(1); var_Level->set_Label(TVariant("<%dddd%>")); var_Level->Alignment = Exg2anttlib_tlb::AlignmentEnum::CenterAlignment; var_Chart->get_Level(2)->set_Label(TVariant(65536)); var_Chart->NonworkingHours = 16773375; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingDates = false; var_Chart->ShowNonworkingHours = false; var_Chart->AllowInsideZoom = true; Exg2anttlib_tlb::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->DefaultInsideZoomFormat; var_InsideZoomFormat->InsideUnit = Exg2anttlib_tlb::UnitEnum::exMinute; var_InsideZoomFormat->InsideLabel = L"<b><%nn%></b>"; var_Chart->InsideZooms->Add(TVariant(TDateTime(2001,1,1,10,00,00,0).operator double())); G2antt1->EndUpdate(); |
1028 |
Is there any option to find out if two bars intersects
G2antt1->BeginUpdate(); G2antt1->DefaultItemHeight = 22; G2antt1->Columns->Add(L"InterectBars"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->Bars->get_Item(TVariant("Task"))->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsOffset; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("A"),TVariant("A")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("B"),TVariant("B")); var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant(var_Items->get_IntersectBars(h,TVariant("A"),h,TVariant("B")))); h = var_Items->AddItem(TVariant("")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,6).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("A"),TVariant("A")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,10).operator double()),TVariant(TDateTime(2001,1,13).operator double()),TVariant("B"),TVariant("B")); var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant(var_Items->get_IntersectBars(h,TVariant("A"),h,TVariant("B")))); h = var_Items->AddItem(TVariant("")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,6).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("B"),TVariant("B")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,10).operator double()),TVariant(TDateTime(2001,1,13).operator double()),TVariant("A"),TVariant("A")); var_Items->set_CellValue(TVariant(h),TVariant(0),TVariant(var_Items->get_IntersectBars(h,TVariant("A"),h,TVariant("B")))); G2antt1->EndUpdate(); |
1027 |
How can I find if a specified hour is a working or non-working hour, when using the ItemNonWorkingUnits
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Hour")->FormatColumn = L"hour(value)"; G2antt1->Columns->Add(L"Type")->FormatColumn = L"value != 0 ? 'non-working' : 'working'"; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,164); var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->LevelCount = 2; var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exHour; var_Chart->NonworkingHours = 1; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double())); bool w = G2antt1->Chart->get_IsNonworkingDate(TVariant(G2antt1->Items->get_CellValue(TVariant(h),TVariant(0))),TNoParam()); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(w)); h = var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double())); var_Items->set_ItemNonworkingUnits(h,TVariant(false),L"hour(value) >0 "); w = G2antt1->Chart->get_IsNonworkingDate(TVariant(G2antt1->Items->get_CellValue(TVariant(h),TVariant(0))),TVariant(h)); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(w)); G2antt1->EndUpdate(); |
1026 |
How can I find if a specified hour is a working or non-working hour
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Hour")->FormatColumn = L"hour(value)"; G2antt1->Columns->Add(L"Type")->FormatColumn = L"value != 0 ? 'non-working' : 'working'"; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,164); var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->LevelCount = 2; var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exHour; var_Chart->NonworkingHours = 1; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double())); bool w = G2antt1->Chart->get_IsNonworkingDate(TVariant(G2antt1->Items->get_CellValue(TVariant(h),TVariant(0))),TNoParam()); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(w)); h = var_Items->AddItem(TVariant(TDateTime(2001,1,1,1,00,00,0).operator double())); w = G2antt1->Chart->get_IsNonworkingDate(TVariant(G2antt1->Items->get_CellValue(TVariant(h),TVariant(0))),TNoParam()); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(w)); G2antt1->EndUpdate(); |
1025 |
How can I find if a specified date-time is a working or non-working unit, when using the ItemNonWorkingUnits
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Date")->Width = 48; G2antt1->Columns->Add(L"Type")->FormatColumn = L"value != 0 ? 'non-working' : 'working'"; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,128); var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double())); bool w = G2antt1->Chart->get_IsNonworkingDate(TVariant(G2antt1->Items->get_CellValue(TVariant(h),TVariant(0))),TNoParam()); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(w)); h = var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double())); var_Items->set_ItemNonworkingUnits(h,TVariant(false),L"weekday(value) in (1)"); w = G2antt1->Chart->get_IsNonworkingDate(TVariant(G2antt1->Items->get_CellValue(TVariant(h),TVariant(0))),TVariant(h)); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(w)); G2antt1->EndUpdate(); |
1024 |
How can I find if a specified date-time is a working or non-working unit
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Date")->Width = 48; G2antt1->Columns->Add(L"Type")->FormatColumn = L"value != 0 ? 'non-working' : 'working'"; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,128); var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double())); bool w = G2antt1->Chart->get_IsNonworkingDate(TVariant(G2antt1->Items->get_CellValue(TVariant(h),TVariant(0))),TNoParam()); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(w)); h = var_Items->AddItem(TVariant(TDateTime(2001,1,6).operator double())); w = G2antt1->Chart->get_IsNonworkingDate(TVariant(G2antt1->Items->get_CellValue(TVariant(h),TVariant(0))),TNoParam()); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(w)); G2antt1->EndUpdate(); |
1023 |
When zooming to days, the non-working part of the chart occupies some not useful space. Can I reduce it
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2002,1,3).operator double())); var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; var_Chart->LevelCount = 2; var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->get_Level(0)->set_Label(TVariant("Week: <%ww%>")); Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(1); var_Level->set_Label(TVariant("<%d%>/<%m2%>")); var_Level->FormatLabel = L"weekday(dvalue) in (0,6) ? 'end' : value"; var_Chart->UnitWidth = 32; var_Chart->UnitWidthNonworking = -32; G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Default")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2002,1,4).operator double()),TVariant(TDateTime(2002,1,8).operator double()),TVariant("A"),TNoParam()); G2antt1->EndUpdate(); |
1022 |
My chart display only working hours, but when zooming to days, each day shows the non-working part of the day too, even if I use the ShowNonWorkingUnits property on False. What am I doing wrong
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2002,1,3,10,00,00,0).operator double())); var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; var_Chart->LevelCount = 2; var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->get_Level(0)->set_Label(TVariant("<%ww%>")); Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(1); var_Level->set_Label(TVariant("<%dd%>")); var_Level->Unit = Exg2anttlib_tlb::UnitEnum::exHour; var_Level->Count = 24; var_Chart->NonworkingHours = 16761855; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingHours = false; var_Chart->UnitWidth = 32; G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Default")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2002,1,4,10,00,00,0).operator double()),TVariant(TDateTime(2002,1,8,2,00,00,0).operator double()),TVariant("A"),TNoParam()); var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); G2antt1->EndUpdate(); |
1021 |
I need to display only working hours and weekend part, but for some items I need another non-working part. Is this possible
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2002,1,3).operator double())); var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; var_Chart->LevelCount = 2; var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%ddd%>")); var_Level->FormatLabel = L"weekday(dvalue) in (0,6) ? '' : value"; Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1); var_Level1->set_Label(TVariant(65536)); var_Level1->FormatLabel = L"weekday(dvalue) in (0,6) ? 'end' : value"; var_Chart->NonworkingHours = 16761855; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingHours = false; var_Chart->UnitWidthNonworking = -24; G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Default")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2002,1,4).operator double()),TVariant(TDateTime(2002,1,8).operator double()),TVariant("A"),TNoParam()); var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); h = var_Items->AddItem(TVariant("Friday")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2002,1,3).operator double()),TVariant(TDateTime(2002,1,7,12,00,00,0).operator double()),TVariant("A"),TNoParam()); var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); var_Items->set_ItemNonworkingUnits(h,TVariant(false),L"weekday(value) in (0,6,5) or hour(value)<10 or hour(value)>=14"); h = var_Items->AddItem(TVariant("Till 13")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2002,1,4).operator double()),TVariant(TDateTime(2002,1,7,12,00,00,0).operator double()),TVariant("A"),TNoParam()); var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); var_Items->set_ItemNonworkingUnits(h,TVariant(false),L"weekday(value) in (0,6) or hour(value)<10 or hour(value)>=13"); G2antt1->EndUpdate(); |
1020 |
I can display the working hours, but how can I hide the weekend or non-working part of the chart when using the ShowNonWorkingUnits property on False
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2002,1,3).operator double())); var_Chart->LevelCount = 2; var_Chart->get_Level(0)->set_Label(TVariant("<%ddd%>")); var_Chart->get_Level(1)->set_Label(TVariant(65536)); var_Chart->NonworkingHours = 16761855; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingDates = false; var_Chart->ShowNonworkingHours = false; |
1019 |
How can I display only the working hours but uses less space for non-working part, such as weekend
|
1018 |
How can I display only the working hours but uses less space for non-working part, such as weekend
|
1017 |
How can I display only the working hours
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2002,1,3).operator double())); var_Chart->LevelCount = 2; var_Chart->get_Level(0)->set_Label(TVariant("<%ddd%>")); var_Chart->get_Level(1)->set_Label(TVariant(65536)); var_Chart->NonworkingHours = 16761855; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingHours = false; |
1016 |
How can I specify non-working hours
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2002,1,3).operator double())); var_Chart->LevelCount = 2; var_Chart->get_Level(0)->set_Label(TVariant("<%ddd%>")); var_Chart->get_Level(1)->set_Label(TVariant(65536)); var_Chart->NonworkingHours = 16761855; |
1015 |
How can I display the working hours for a bar
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Tasks"); Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Working"); var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(258)); var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarKey,TVariant("A")); var_Column->FormatColumn = L"(0:=round(value*24)) != 0 ? =:0 : ''"; G2antt1->Items->AllowCellValueToItemBar = true; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,96); var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2002,1,3).operator double())); var_Chart->LevelCount = 2; var_Chart->get_Level(0)->set_Label(TVariant("<%ddd%>")); var_Chart->get_Level(1)->set_Label(TVariant("<%hh%>")); var_Chart->NonworkingHours = 16761855; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingHours = false; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2002,1,4).operator double()),TVariant(TDateTime(2002,1,8).operator double()),TVariant("A"),TNoParam()); var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); h = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2002,1,3).operator double()),TVariant(TDateTime(2002,1,4).operator double()),TVariant("A"),TNoParam()); var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); G2antt1->EndUpdate(); |
1014 |
Is it possible to show only working hours, showing a small part for the weekend days, and in the same time showing the bars by splitting the non-working part and keeping the working units for the bar while moving
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2002,1,3).operator double())); var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesGeometric; var_Chart->set_PaneWidth(false,0); var_Chart->LevelCount = 2; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%ddd%>")); var_Level->Alignment = Exg2anttlib_tlb::AlignmentEnum::CenterAlignment; var_Level->FormatLabel = L"weekday(dvalue) in (0,6) ? `` : value"; Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1); var_Level1->set_Label(TVariant(65536)); var_Level1->DrawGridLines = true; var_Level1->FormatLabel = L"weekday(dvalue) in (0,6) ? `<font ;6>weekend</font>` : value"; var_Chart->NonworkingHours = 16761855; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingDates = true; var_Chart->ShowNonworkingHours = false; var_Chart->UnitWidthNonworking = -40; G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2002,1,4).operator double()),TVariant(TDateTime(2002,1,8).operator double()),TVariant("A"),TNoParam()); var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); G2antt1->EndUpdate(); |
1013 |
How can I show bars with different solid color but black border
G2antt1->BeginUpdate(); G2antt1->VisualAppearance->Add(1,TVariant("C:\\Program Files\\Exontrol\\ExG2antt.NET\\sample\\EBN\\blackbox.ebn")); G2antt1->Columns->Add(L"Task"); G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exg2anttlib_tlb::IBarPtr var_Bar = G2antt1->Chart->Bars->get_Item(TVariant("Task")); var_Bar->Color = 0x1000000; var_Bar->Height = 15; G2antt1->Chart->set_PaneWidth(false,0); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant(""),TNoParam()); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(65535)); h = var_Items->AddItem(TVariant("Task")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant(""),TNoParam()); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255)); G2antt1->EndUpdate(); |
1012 |
I want to display a vertical line for each week, while I still need a vertical separator for each day. Is this possible
G2antt1->GridLineColor = RGB(240,240,240); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->NonworkingDays = 0; var_Chart->LevelCount = 2; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->DrawGridLines = true; var_Level->GridLineColor = RGB(0,0,0); Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1); var_Level1->DrawGridLines = true; var_Level1->GridLineColor = RGB(240,240,240); |
1011 |
How can I display the levels as year, day, AM and PM for each day
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2009,12,1).operator double())); var_Chart->UnitWidth = 22; var_Chart->LevelCount = 3; var_Chart->get_Level(0)->set_Label(TVariant("<%yyyy%>")); var_Chart->get_Level(1)->set_Label(TVariant("<%mm%>/<%dd%>")); Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(2); var_Level->set_Label(TVariant("<%AM/PM%>")); var_Level->Count = 12; |
1010 |
How can I change the pattern for a specified time unit, in the chart area
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->LevelCount = 2; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2008,1,1).operator double())); var_Chart->AllowInsideZoom = true; var_Chart->AllowResizeInsideZoom = false; var_Chart->InsideZoomOnDblClick = false; Exg2anttlib_tlb::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->DefaultInsideZoomFormat; var_InsideZoomFormat->PatternChart = Exg2anttlib_tlb::PatternEnum::exPatternBDiagonal; var_InsideZoomFormat->PatternColorChart = RGB(255,0,0); Exg2anttlib_tlb::IInsideZoomsPtr var_InsideZooms = var_Chart->InsideZooms; var_InsideZooms->SplitBaseLevel = false; var_InsideZooms->DefaultWidth = 18; var_InsideZooms->Add(TVariant(TDateTime(2008,1,4).operator double()))->AllowInsideFormat = false; G2antt1->EndUpdate(); |
1009 |
How can I hide the non-working hours, but still display the non-working days with even less space
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2009,11,19).operator double())); var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesGeometric; var_Chart->set_PaneWidth(false,0); var_Chart->LevelCount = 2; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%dddd%>")); var_Level->Alignment = Exg2anttlib_tlb::AlignmentEnum::CenterAlignment; var_Level->FormatLabel = L"weekday(dvalue) in (0,6) ? `` : value"; Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1); var_Level1->set_Label(TVariant(65536)); var_Level1->DrawGridLines = true; var_Level1->FormatLabel = L"weekday(dvalue) in (0,6) ? `<font ;6>weekend</font>` : value"; var_Chart->NonworkingHours = 16761855; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingDates = true; var_Chart->ShowNonworkingHours = false; var_Chart->UnitWidth = 32; var_Chart->UnitWidthNonworking = -32; G2antt1->EndUpdate(); |
1008 |
How can I hide the non-working hours, but still display the non-working days with less space
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2009,11,19).operator double())); var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesGeometric; var_Chart->set_PaneWidth(false,0); var_Chart->LevelCount = 2; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%dddd%>")); var_Level->Alignment = Exg2anttlib_tlb::AlignmentEnum::CenterAlignment; var_Level->FormatLabel = L"weekday(dvalue) in (0,6) ? `<font ;6>` + value + `</font>` : value"; Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1); var_Level1->set_Label(TVariant(65536)); var_Level1->DrawGridLines = true; var_Level1->FormatLabel = L"weekday(dvalue) in (0,6) ? `<font ;6>` + value + `</font>` : value"; var_Chart->NonworkingHours = 16761855; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingDates = true; var_Chart->ShowNonworkingHours = false; var_Chart->UnitWidth = 32; var_Chart->UnitWidthNonworking = 12; G2antt1->EndUpdate(); |
1007 |
How can I hide the non-working hours, but still display the non-working days
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2009,11,19).operator double())); var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesGeometric; var_Chart->set_PaneWidth(false,0); var_Chart->LevelCount = 2; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%dddd%>")); var_Level->Alignment = Exg2anttlib_tlb::AlignmentEnum::CenterAlignment; Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1); var_Level1->set_Label(TVariant(65536)); var_Level1->DrawGridLines = true; var_Chart->NonworkingHours = 16761855; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingDates = true; var_Chart->ShowNonworkingHours = false; G2antt1->EndUpdate(); |
1006 |
How can I hide the non-working hours, and the non-working days
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2009,11,19).operator double())); var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesGeometric; var_Chart->set_PaneWidth(false,0); var_Chart->LevelCount = 2; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%dddd%>")); var_Level->Alignment = Exg2anttlib_tlb::AlignmentEnum::CenterAlignment; Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1); var_Level1->set_Label(TVariant(65536)); var_Level1->DrawGridLines = true; var_Chart->NonworkingHours = 16761855; var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingDates = false; var_Chart->ShowNonworkingHours = false; G2antt1->EndUpdate(); |
1005 |
Can I highlights the non-working hours while my chart shows days
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->UnitWidth = 48; var_Chart->LevelCount = 2; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(1); var_Level->set_Label(TVariant("<%d%>")); var_Level->Unit = Exg2anttlib_tlb::UnitEnum::exHour; var_Level->Count = 24; var_Chart->NonworkingHours = 127; |
1004 |
How can I reduce the space/area being occupied by non-working units days or hours (method 2)
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->LevelCount = 2; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,64); var_Chart->UnitWidthNonworking = -8; var_Chart->get_Level(1)->FormatLabel = L"weekday(dvalue) in (0,6) ? '.' : value"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K2"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K3"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K4"),TNoParam()); var_Items->set_ItemBar(h,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255)); G2antt1->EndUpdate(); |
1003 |
How can I reduce the space/area being occupied by non-working units days or hours (method 1)
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->LevelCount = 2; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,64); var_Chart->UnitWidthNonworking = 4; var_Chart->get_Level(1)->FormatLabel = L"weekday(dvalue) in (0,6) ? '' : value"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K2"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K3"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K4"),TNoParam()); var_Items->set_ItemBar(h,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255)); G2antt1->EndUpdate(); |
1002 |
How can I hide the non-working units
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->LevelCount = 2; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->set_PaneWidth(false,64); var_Chart->ShowNonworkingUnits = false; var_Chart->ShowNonworkingDates = false; var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exVLines; var_Chart->get_Level(0)->DrawGridLines = true; var_Chart->GridLineStyle = Exg2anttlib_tlb::GridLinesStyleEnum::exGridLinesGeometric; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K1"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K2"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K3"),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 4")),TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("K4"),TNoParam()); var_Items->set_ItemBar(h,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255)); G2antt1->EndUpdate(); |
1001 |
How can I determine that a certain bar is the topmost (zorder)
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,27).operator double())); var_Chart->Bars->get_Item(TVariant("Task"))->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternSolid; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("B in front")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("B"),TVariant("<fgcolor=FF0000>B</fgcolor>")); var_Items->set_ItemBar(h,TVariant("B"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarOffset,TVariant(-2)); var_Items->set_ItemBar(h,TVariant("B"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18)); var_Items->set_ItemBar(h,TVariant("B"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255)); h = var_Items->AddItem(TVariant("A in back")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("A"),TVariant("<fgcolor=FF0000>A</fgcolor>")); var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarOffset,TVariant(-2)); var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18)); var_Items->set_ItemBar(h,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255)); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("B"),TNoParam()); G2antt1->EndUpdate(); |